<template>
	<view class="container">
		<!-- 热门 -->
		<view class="hot_project">
			<!-- 标题 -->
			<title-component titleName="热门任务" :isShow="isShow"></title-component>
			<!-- 滑动区域 -->
			<u-swiper :list="list3" previousMargin="30" nextMargin="30" circular :autoplay="false" radius="5"
				bgColor="#ffffff">
			</u-swiper>
		</view>
		<!-- 任务 -->
		<view class="task_project">
			<!-- 标题 -->
			<title-component titleName="推荐任务" :isShow="isShow"></title-component>
			<!-- 滑动区域 -->
			<task-card
				v-for="item in articleList"
				:key="item.id"
				:title="item.taskName"
				:description="item.description"
				:createTime="item.createTime"
				:id="item.id"
			>
			</task-card>
		</view>
	</view>
</template>

<script>
	import {
		taskList
	} from '@/config/api.js';
	export default {
		data() {
			return {
				articleList: [],
				isShow:true,
				list3: [
					"https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2350817201,1137116540&fm=26&gp=0.jpg",
					"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3545834692,4156954932&fm=26&gp=0.jpg",
					"https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=774373677,2313985244&fm=26&gp=0.jpg"
				],
			};
		},
		created() {
			taskList({status: 0}).then((res) => {
				console.log(res)
				this.articleList = res.data
			})
		},
	}
</script>

<style lang="scss">
	@import url("/static/css/base.css");

</style>
